package com.example.handlers;

import com.example.enums.SysHandlerEnum;
import com.example.po.SysJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * @author: chentao
 * @data 2025年08月02日 下午10:13
 */
@Service
public class SysSMSHandler implements SysHandler {

    private static final Logger logger = LoggerFactory.getLogger(SysSMSHandler.class);

    @Override
    public boolean isMatch(SysJob sysJob) {
        return SysHandlerEnum.SMSSendHandler.getCode().equalsIgnoreCase(sysJob.getType());
    }

    @Override
    public void handler(SysJob sysJob) throws Exception {
        logger.info("SMS发送成功: " + sysJob.getId());
    }
}
